package com.bigevent.mapper;

import com.bigevent.pojo.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ManagerMapper {

    @Select("select * from user")
    List<User> listAuthor();

    @Update("update user set authority = 0 where id = #{userId}")
    void updateStatus(Integer userId);

    @Update("update user set authority = 1 where id = #{userId}")
    void cancelStatus(Integer userId);

    @Delete("delete from user where id = #{userId}")
    void delete(Integer userId);
}
